let s = "aabcd",t = "aabcde"
var findTheDifference = function(s, t) {
    let obj ={}
    for(let i=0;i<s.length;i++){
        if(obj[s[i]]){
            obj[s[i]]+=1
        }else{
            obj[s[i]] = 1
        }
    }
    
    for(let j=0;j<t.length;j++){
        if(obj.hasOwnProperty(t[j])){
            obj[t[j]]--
            if(obj[t[j]]<0){
                return t[j]
            }
        }else{
                return t[j]
            }
    }
};
console.log(findTheDifference(s,t));
